// 导入封装好的网络请求类工具
import Network from '../../network';
import request from '../../../utils/request';
// 封装各种接口请求
// export const 接口名 = () => Network.get('/路由',参数对象);

export const importExcel = (file,tablename) => {
    return request({
        url: `/excel/importExcel/${tablename}`,
        method: 'post',
        data:file,
        
    })
}

export const downloadExcel = (tablename) => {
    return request({
        url: `/excel/downloadTemplateExcel/${tablename}`,
        headers:{
            'Content-Type':'application/octet-stream'
        },
        method: 'get',
        responseType:'blob',
        responseEncoding:'utf-8'})
    }
        
        
export const downTemplateExcel=(tableName)=>{
    return request({
        url:`/excel/downloadTemplateExcel/${tableName}`,
        method:'get',
        headers:{
            'Content-Type':'application/octet-stream'
        },
        responseType: 'blob',
        responseEncoding:'utf-8'

    })
}

//固井预测
export const CellPredict = (form) => {
    return request({
        url: '/cement/predict',
        method: 'post',
        data:form,
        
    })
}

//全井导入
export const InsertOneWellAllData = (file) => {
    return request({
        url: '/excel/insertOneWellAllData',
        method: 'post',
        data:file,
    })
}